package com.qaml.mes.device.controller;


import com.earth.output.OutputMessage;
import com.qaml.mes.device.api.EqpTypeConfigService;
import com.qaml.mes.device.vo.eqp.EqpCraftConfigVO;
import com.qaml.mes.device.vo.eqp.EqpTypeConfigVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 设备类型表 前端控制器
 * </p>
 *
 * @author leikai
 * @since 2024-03-07
 */
@RestController
@RequestMapping("/eqp")
@Api(tags = "设备类型")
public class EqpTypeConfigController {

    @Resource
    private EqpTypeConfigService eqpTypeConfigService;


    @GetMapping(value = "/type/list")
    @ApiOperation(value = "设备类型-列表(Web)", notes = "设备类型-列表")
    public OutputMessage<List<EqpTypeConfigVO>> list() {
        List<EqpTypeConfigVO> result = eqpTypeConfigService.list();
        return OutputMessage.success(result);
    }


    @GetMapping(value = "/craft/list")
    @ApiOperation(value = "工艺类型", notes = "工艺类型-列表")
    public OutputMessage<List<EqpCraftConfigVO>> craftList() {
        List<EqpCraftConfigVO> result = eqpTypeConfigService.craftList();
        return OutputMessage.success(result);
    }

}
